#pragma once
#include "shader.h"

#include <Cg/cg.h>

namespace krryn{
namespace system_imp{
	class shader_cg : public view::shader{
	public:
		shader_cg(const std::string &a_Filename, CGcontext a_Context);
		virtual ~shader_cg();
		virtual void enable() = 0;
		virtual void disable() = 0;
		void check_error(CGcontext cgContext) const;
	protected:
		std::string m_Filename;

		CGcontext m_Context;
		CGprogram m_VertexShader, m_PixelShader;
		CGprofile m_VertexProfile, m_PixelProfile;

		// Must be called by the child's constructor!
		void init();
	};
}
}